<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 多态的表现:JS中到处都是多态
    function sum(a1, a2) {
      console.log(a1 + a2)
      return a1 + a2;
    }
    sum(20, 30)
    sum('abc', 'cba')

    // 多态的表现
    var foo = 123
    foo = 'Hello World'
    foo = {}
    foo = []

  </script>
</body>

</html>